package com.hae.shop.micoshopportalweb.controller.member.vo;

import com.hae.shop.common.constant.Constants;
import com.hae.shop.common.util.annotation.MemberOf;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 页面登录请求实体类
 */
@Data
public class LoginReqVo {

    /**
     * 用户关联 类型
     */
    @NotBlank(message = "关联类型不能为空")
    @MemberOf(member = {Constants.UNION_LOGIN_TYPE_QQ, Constants.UNION_LOGIN_TYPE_WX}, message = "不支持的登录类型")
    private String type;

    /**
     * 手机号码
     */
    @NotBlank(message = "手机号不能为空！")
    @Size(min = 11, max = 11, message = "手机长度11位！")
    private String mobile;

    /**
     * 密码
     */
    @NotBlank(message = "密码不能为空！")
    private String password;

    /**
     * 图片验证码
     */
    @NotNull(message = "验证码不能为null！")
    @NotBlank(message = "验证码不能为空！")
    private String graphicCode;
}
